const path = require("path");
const express = require("express");
const app = express();
const indexRoute = require('./routes/index');
const usersRoute = require('./routes/users');

app.set('views', path.join(__dirname, 'views'));  // 设置存放模板文件的目录
app.set('view engine', 'ejs'); // 设置模板引擎为 ejs

app.use('/', indexRoute);
app.use('/users', usersRoute);

app.listen(3000);